﻿@model xraiding.ViewModels.CharacterInfoViewModel
@{
    ViewBag.Title = "Character Manager";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Character Manager</h2>
<table>
    <thead>
        <th>
            Character
        </th>
        <th>
            Realm
        </th>
        <th>
            Class
        </th>
        <th>
            Level
        </th>
        <th>
            Primary Role
        </th>
        <th>
            Seconary Role
        </th>
    </thead>
    <tbody>
        @foreach(var character in Model.Characters)
        {
            <tr>
                <td>
                    @character.Name
                </td>
                <td>
                    @character.Realm
                </td>
                <td>
                    @character.Class
                </td>
                <td>
                    @character.Level
                </td>
                <td>
                    @character.PrimaryRole
                </td>
                <td>
                    @character.SecondaryRole
                </td>
                <td>
                    @Html.ActionLink("Edit", "EditCharacter", "CharacterManager", new{id=character.CharacterId}, null)
                </td>
                <td>
                    @Html.ActionLink("Delete", "DeleteCharacter", "CharacterManager", new{id=character.CharacterId}, null)
                </td>
            </tr>
        }
    </tbody>
</table>
<ul>
    <li>@Html.ActionLink("Add a new character", "NewCharacter", "CharacterManager")</li>
    <li>@Html.ActionLink("Home", "Index", "XRaiding")</li>
</ul>
